home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / dev / misc / butclass10.lha / ButClass10 / Include / ButClass.h
C/C++ Source or Header  |  1995-09-17  |  3KB  |  104 lines

  1. /****************************************************\
  2. ** ButClass.lib  ** 0.9  **  (21.8.95)              **
  3. ******************************************************
  4. **                                                  **
  5. ** C Header for the BOOPSI button gadget class.     **
  6. **                                                  **
  7. ** ButtonClass with special features:               **
  8. **                                                  **
  9. **  ClipText, Justify...                            **
  10. **                                                  **
  11. \****************************************************/
  12.  
  13.  
  14.  
  15. #ifndef BUTCLASS_H
  16. #define BUTCLASS_H
  17.  
  18. #ifndef EXEC_TYPES_H
  19. #include <exec/types.h>
  20. #endif
  21.  
  22. #ifndef INTUITION_CLASSES_H
  23. #include <intuition/classes.h>
  24. #endif
  25.  
  26. #ifndef UTILITY_TAGITEM_H
  27. #include <utility/tagitem.h>
  28. #endif
  29.  
  30. /* Tags */
  31. #define BUT_TB                  TAG_USER+0x70000
  32.  
  33. #define BUT_Label               (BUT_TB+1)              /* ISG-- */
  34. #define BUT_ClipText            (BUT_TB+2)              /* I-G-- */
  35. #define BUT_Justify             (BUT_TB+3)              /* I-G-- */
  36.  
  37.  
  38. #define BUT_LabelPen            (BUT_TB+4)              /* ISG-- */
  39. #define BUT_SelectedLabelPen    (BUT_TB+5)              /* ISG-- */
  40.  
  41. #define BUT_TextFont            (BUT_TB+6)              /* I---- */
  42. #define BUT_Underscore          (BUT_TB+7)              /* I---- */
  43.  
  44. /* Can use follow TAGS of the bgui.library */
  45. /* FRM_BackPen                                (ISG--)      */
  46. /* FRM_SelectedBackPen                        (ISG--)      */
  47. /* FRM_BackFill                               (ISG--)      */
  48. /* FRM_Recessed                               (ISG--)      */
  49.  
  50.  
  51. /* Definitions */
  52. #define BSEQ_J                  "\x2"
  53.  
  54.  
  55. /* Prototypes */
  56. Class *InitButClass( void );
  57. BOOL FreeButClass( Class * );
  58.  
  59.  
  60. /*
  61. **  Macros
  62. **/
  63. #define ButObject( class )   NewObject( class, NULL
  64.  
  65. #define But( class, label, id )\
  66.     ButObject( class ),\
  67.         BUT_Label,      label,\
  68.         BUT_Underscore, '_',\
  69.         GA_ID,          id,\
  70.         ButtonFrame,\
  71.     EndObject
  72.  
  73.  
  74. #define ButClip( class, label, id )\
  75.     ButObject( class ),\
  76.         BUT_Label,      label,\
  77.         BUT_ClipText,   TRUE,\
  78.         BUT_Underscore, '_',\
  79.         GA_ID,          id,\
  80.         ButtonFrame,\
  81.     EndObject
  82.  
  83. #define ButJustify( class, label, id )\
  84.     ButObject( class ),\
  85.         BUT_Label,      label,\
  86.         BUT_Justify,    TRUE,\
  87.         BUT_Underscore, '_',\
  88.         GA_ID,          id,\
  89.         ButtonFrame,\
  90.     EndObject
  91.  
  92. #define ButClipJust( class, label, id )\
  93.     ButObject( class ),\
  94.         BUT_Label,      label,\
  95.         BUT_Justify,    TRUE,\
  96.         BUT_ClipText,   TRUE,\
  97.         BUT_Underscore, '_',\
  98.         GA_ID,          id,\
  99.         ButtonFrame,\
  100.     EndObject
  101.  
  102.  
  103. #endif
  104.